﻿@model CmsAdminPageModel

@{
    ResFile = "cms_Pages";
    int currentTemplateRegion = ViewBag.CurrentTemplateRegion;
    if (currentTemplateRegion == 0)
    {
        currentTemplateRegion = int.Parse(Model.TemplateRegionList.Select(p => p.Value).First());
    } 
}
<fieldset class="b-form b-form_nopad">
    <ol class="b-form__rows ul-reset g-clear">
        <li class="b-form__row g-clear">
            <label for="PageName">@_("Page Title")</label>
            @Html.TextBoxFor(p => p.PageName, new { @class = "text", disabled = "disabled" })
        </li>
        <li class="b-form__row g-clear">
            <label for="PageUrl">@_("Page url")</label>
            @Html.TextBoxFor(p => p.PageUrl, new { @class = "text", disabled = "disabled" })
        </li>
    </ol>
</fieldset>
<div class="b-form b-form_bordered b-form_theme_yellow">
    <div class="b-form__head">
		<fieldset class="b-form b-form_nopad b-form_wrapped">
			<ol class="b-form__rows ul-reset g-clear">
			    <li class="b-form__row g-clear">
	                <label for="TemplateRegionList">@_("Select page region")</label>
	                @Html.DropDownList("Value", new SelectList(Model.TemplateRegionList, "Value", "Text", currentTemplateRegion), new { id = "TemplateRegionList", @class = "reset-me" })
	                <input type="hidden" name="Id" value="@Model.Id" />    
	                <a class="template-preview" href="@Url.Action("showregions", "cmstemplate", new { id = Model.TemplateId })">@_("Show regions")</a>            
	            </li>
			</ol>
		</fieldset>
	    <div id="pageControls">
	        @{Html.RenderAction("pagecontrols", new { pageId = Model.Id, templateRegionId = currentTemplateRegion, editable = false });}
	    </div>
    </div>
</div>